package com.chenbei.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chenbei.common.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema
@TableName("sys_menu")
public class SysMenu extends BaseEntity {

    @Schema(description = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "父节点")
    @TableField("pid")
    private Long pid;

    @Schema(description = "资源名称")
    @TableField("name")
    private String name;

    @Schema(description = "图标")
    @TableField("icon")
    private String icon;

    @Schema(description = "资源类型[1:目录|2:菜单|3:按钮]")
    @TableField("type")
    private Integer type;

    @Schema(description = "权限标识")
    @TableField("permission")
    private String permission;

    @Schema(description = "路由地址")
    @TableField("path")
    private String path;

    @Schema(description = "组件地址")
    @TableField("component")
    private String component;

    @Schema(description = "是否缓存[0:否|1:是]")
    @TableField("keepalive")
    private Integer keepalive;

    @Schema(description = "排序")
    @TableField("sort")
    private Integer sort;

    @Schema(description = "启用状态[1:启用|2:禁用]")
    @TableField("status")
    private Integer status;

    @Schema(description = "是否显示[0:隐藏|1:显示]")
    private Integer visible;
}
